﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;

using Joyintech.Model.inpiao365;

using Joyintech.Common;
using Joyintech.BLL.inpiao365;

namespace Joyintech.Admin.inpiao365
{
    public partial class checkRight : System.Web.UI.UserControl
    {
        /// <summary>
        /// 本页权限项
        /// </summary>
        public string funCode = string.Empty;

        /// <summary>
        /// 用户默认界面
        /// </summary>
        protected string userTheme = "1";

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected override void OnLoad(EventArgs e)
        {
            //获取用户缓存的界面风格
            if (!Utils.GetCookie("userTheme").Equals(""))
            {
                userTheme = Utils.GetCookie("userTheme");
            }

            //判断用户SessionKey、SessionFun是否存在

            //获取当前登录用户
            systemUser currentCustomer = systemUser_BLL.GetInstance().GetCurrentSystemUser();

            if (currentCustomer == null)
            {
                Response.Redirect("/Login.aspx");
            }

            //if ("" != funCode)
            //{
            //    ArrayList userFun = new ArrayList();

            //    userFun = (ArrayList)HttpContext.Current.Session[Constants.SESSION_USERFUN];

            //    if (userFun == null || userFun.Count == 0 && userFun.IndexOf(funCode) == -1)
            //    {
            //        //提示，用户没有权限
            //    }
            //}

            base.OnLoad(e);
        }
    }
}